import React, { Suspense } from "react";
import { Skeleton ,Spin} from "antd";


const lazyLoad = (Comp: React.LazyExoticComponent<any>): React.ReactNode => {
    return (
        <Suspense
            fallback={
                <Skeleton
                 />
            }
        >
            <Comp />
        </Suspense>
    );
};

export default lazyLoad;
